<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>被load的页面</title>
    <script src="../../js/jquery-3.4.1.js"></script>
</head>
<body>
<main id="main">
    <div>来自load页面的内容</div>
    <button id="alertMessage">弹出消息</button>
    <button id="alertMessage2">弹出消息</button>
    <script>
        $(function () {
            console.log("load init");
            buttonInit();
        });

        function buttonInit() {
            $('#alertMessage').click(function () {
                alert(1234);
            });

            $('#alertMessage2').click(function () {
                alert(5678);
            });
        }
    </script>
    <script>

        $(function () {
            console.log("load init2");
        })

    </script>
</main>
</body>
</html>